import * as typegoose from '@midwayjs/typegoose';
import { defaults } from 'joi/lib/common';
import { DB_NAME } from '../constants';

defaults.allowUnknown = true;
defaults.allowEmpty = true;

export const redis = {
  host: '127.0.0.1',
  port: 6379,
  options: {
    password: '',
    db: 1
  }
};

export const mongoose: typegoose.DefaultConfig = {
  uri: 'mongodb://127.0.0.1:27017',
  options: {
    useNewUrlParser: true,
    useUnifiedTopology: true,
    dbName: DB_NAME
  }
};


export const wechat = {
  corpid: 'fdafda',
  corpsecret: 'fdsafasfda',
  agentid: 'fdsafdafa'
};
